﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GurLoader;
using GurLoader.Service;
using NUnit.Framework;

namespace GurLoaderWPF.Test.Service
{
    [TestFixture]
    public class CommandProgressTests
    {
        [Test]
        public void CreateInstanceCommandProgressDescriptionStatusTest()
        {
            Command command = Command.SendAlbum;
            int progress = 32;
            string description = "Content Description";
            string status = "In progress";

            var instance = new CommandProgress(command, progress, description, status);

            Assert.IsNotNull(instance);
            Assert.AreEqual(command, instance.Command);
            Assert.AreEqual(progress, instance.ProgressPercentage);
            Assert.AreEqual(description, instance.ContentDescription);
            Assert.AreEqual(status, instance.Status);
        }

        [Test]
        public void CreateInstanceCommandProgressStatusTest()
        {
            Command command = Command.SendAlbum;
            int progress = 32;
            string status = "In progress";

            var instance = new CommandProgress(command, progress, status);

            Assert.IsNotNull(instance);
            Assert.AreEqual(command, instance.Command);
            Assert.AreEqual(progress, instance.ProgressPercentage);
            Assert.AreEqual(status, instance.Status);
        }

        [Test]
        public void CreateInstanceCommandStatusResultTest()
        {
            Command command = Command.SendAlbum;
            object results = "Result";
            string status = "Complete";

            var instance = new CommandProgress(command, status, results);

            Assert.IsNotNull(instance);
            Assert.AreEqual(command, instance.Command);
            Assert.AreEqual(100, instance.ProgressPercentage);
            Assert.AreEqual(status, instance.Status);
            Assert.AreEqual(results, instance.Result);
        }
    }
}
